<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>数据分页</title>
    <link rel="stylesheet" href="{{asset('css/app.css')}}">

</head>

<body>
    <table>
        <thead>
            <tr>
                <th>id</th>
                <th>名字</th>
                <th>年龄</th>
                <th>邮箱</th>
                <th>头像</th>
            </tr>
        </thead>
        <tbody>
            @foreach($data as $val)
            <tr>
                <th>{{$val->id}}</th>
                <th>{{$val->name}}</th>
                <th>{{$val->age}}</th>
                <th>{{$val->email}}</th>
                <th><img src="{{ltrim($val->avatar,'.')}}" width="80px" alt="头像"></th>
            </tr>
            @endforeach

        </tbody>

    </table>
    {{$data -> links()}}
</body>

</html>